/*
 * @Author: cl
 * @Description: 基础变量使用
 * @Date: 2022-12-06 09:54:48
 * @LastEditTime: 2022-12-06 10:05:31
 * @FilePath: \jsnode\typescript\basics.ts
 */
//基础变量
var a = 1;
var b = "i am string";
var c = false;
var sum = function (a, b) {
    return a + b;
};
console.log(sum(123, "234"));
var d = undefined;
//严格模式下
// let e :void = null;//不能赋值为null
// let f :null = undefined;
var g;
g = 123;
g = "234";
var h = 123;
// h = '123'
var i = 123;
i = "123";
var j = {
    test: function () {
        console.log('lalal');
    }
};
console.log(j.test);
var k = {
    test: function () {
        console.log('lalal');
    }
};
// console.log(k.test)
var xx;
xx = "ddd";
console.log(xx);
var child = {
    name: '张三',
    age: 19
};
var child2 = {
    age: 17,
    name: '里斯',
    height: 175
};
var child3 = {
    age: 14,
    name: '王五',
    height: 182,
    play: '篮球'
};
// 数组
var myArray1 = [];
myArray1.push(1);
myArray1.push(4);
myArray1.push(67);
myArray1.push(99);
console.log(myArray1);
var myArray2 = [2, 6, 9, 23, 567546];
console.log(myArray2);
